import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, Link, IndexRoute, Redirect,hashHistory } from 'react-router';
import Login from "./components/Login";
import Register from "./components/Register";
import Home from "./components/Home";

class Index extends React.Component{
    constructor(){
        super();
        this.state = {
            login:new Login,
        };
    }

    render(){
        return (
          <div>
              {this.props.children}
          </div>
        );
    }
}

ReactDOM.render((
<Router history={hashHistory}>
    <Route path="/" component={Index}>
        <IndexRoute  component={Home}/>
        <Route path="login" component={Login}/>
        <Route path="register" component={Register}/>
    </Route>
</Router>), document.getElementById('app')
);
